package cn.fan.vertd.verticle;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.Promise;

public class ScheduleVerticle extends AbstractVerticle {

    private int count = 0;

    @Override
    public void start(Promise<Void> startPromise) throws Exception {
        super.start(startPromise);
        vertx.setPeriodic(1000, timeId -> {
            System.out.println("timeId: " + timeId + "--------" + (count ++));
        });
    }

    @Override
    public void stop(Promise<Void> stopPromise) throws Exception {
        super.stop(stopPromise);
    }
}
